{
    class RoleInfo extends ui.Settle.SettleShowUI {
        constructor (callback) {
            super();
            
            this.callback = callback;

            this.init();
        }

        init () {
            this.btnContinue.on(Laya.Event.CLICK, this, function () {
                this.callback && this.callback();
            });

            this.bar.mediator = new Com.Role.RoleBarMediator(this);
        }

        update (data) {
            let aniPath = `assets/role/${data.player.ho}/other/skin_1`;
            Laya.loader.load([{url : `${aniPath}.png`, type : Laya.Loader.IMAGE}, {url : `${aniPath}.sk`, type : Laya.Loader.BUFFER}], Laya.Handler.create(this, function () {
                let ani = Sail.Utils.createSkeleton(aniPath);
                    ani.pos(392, 578);
                    ani.play("static", true);
                this.addChild(ani);
            }));
            let statusText = "";
            if(data.score[0] > data.score[1]){
                this.resultWin.visible = true;
                statusText = "胜利";
            }else if(data.score[0] < data.score[1]){
                this.resultLoss.visible = true
                statusText = "失败";
            }else{
                this.resultDraw.visible = true;
                statusText = "平局";
            }

            this.userName.text = data.player.ue;
            this.userLevel.text = data.player.ul;
            this.userExpInfo.text = `${data.player.ce}/${data.player.ne}`;
            this.userLevelPro.scrollRect = {x : 0, y : 0, width : this.userLevelPro.width * data.player.ce / data.player.ne, height : this.userLevelPro.height};
            this.userExpExtra.text = `${statusText} +${data.player.ae}`;
            this.medalStatus.text = `战斗${statusText}`;
            this.bm.text = `+${data.player.bm}`;
            this.mm.text = `+${data.player.mm}`;
            this.jm.text = `+${data.player.jm}`;
            this.am.text = `+${data.player.am}`;
            this.medalTotal.text = data.player.t;

            this.bar.mediator.setData({quality : 1, title : "大饼", name : data.player.hn, grade : data.player.gd, cup_num : data.player.cc, next_cup_num : data.player.ct});
            this.dom_reward.text = `${data.player.ac >= 0 ? "+" : ""}${data.player.ac}`;
        }
    }

    Sail.class(RoleInfo, "Com.Settle.RoleInfo");
}